<{include file='public/head'}>
<div class="layui-body">
	<div class="layui-tab layui-tab-brief" lay-filter="tab">
	  <ul class="layui-tab-title">
	    <li class="layui-this">单页修改</li>
	  </ul>
	  <div class="layui-tab-content">
	  	<div class="layui-tab-item layui-show">
	  		<form action="<{:url('/Single/mod/mcode/'.$UrlParam.mcode.'/id/'.$UrlParam.id.'')}><{$UrlParam.backurl}>" method="post" class="layui-form" id="edit">
	  			<input type="hidden" name="formcheck" value="<{$formcheck}>" >
	  			<div class="layui-tab">
					  <ul class="layui-tab-title">
					    <li class="layui-this">基本内容</li>
					    <li>高级内容</li>
					  </ul>
					  <div class="layui-tab-content">
					    <div class="layui-tab-item layui-show">

			                <div class="layui-form-item">
			                     <label class="layui-form-label">内容标题   <span class="layui-text-red">*</span></label>
			                     <div class="layui-input-block">
			                     	<input type="text" name="title" required lay-verify="required" value="<{$content.title}>" placeholder="请输入内容标题" class="layui-input">
			                     </div>
			                </div>
			                <div class="layui-form-item">
			                     <label class="layui-form-label">内容</label>
			                     <div class="layui-input-block">
			                     	<textarea id="myeditor" name="content" style="width:100%;height:240px;"><{$content.content}></textarea >
			                     </div>
			                </div>

			                <div class="layui-form-item">
			                     <label class="layui-form-label">tags</label>
			                     <div class="layui-input-block">
			                     	<input type="text" name="tags" placeholder="请输入文章tag，英文逗号隔开" value="<{$content.tags}>" class="layui-input">
			                     </div>
			                </div>

			                <div class="layui-form-item">
			                     <label class="layui-form-label">作者</label>
			                     <div class="layui-input-block">
			                     	<input type="text" name="author" placeholder="请输入作者" value="<{$content.author}>" class="layui-input">
			                     </div>
			                </div>

			                <div class="layui-form-item">
			                     <label class="layui-form-label">来源</label>
			                     <div class="layui-input-block">
			                     	<input type="text" name="source" placeholder="请输入来源" value="<{$content.source}>" class="layui-input">
			                     </div>
			                </div>

			                <div class="layui-form-item">
			                     <label class="layui-form-label">缩略图</label>
			                     <div class="layui-input-inline">
			                     	<input type="text" name="ico" id="ico" value="<{$content.ico}>" placeholder="请上传缩略图"  class="layui-input">
			                     </div>
			                     <button type="button" class="layui-btn upload watermark" data-des="ico">
								 	 <i class="layui-icon">&#xe67c;</i>上传图片
								 </button>
								 <div id="ico_box" class="pic addedit"><{if condition="$content.ico"}><dl><dt><img src="<{$content.ico}>" data-url="<{$content.ico}>"></dt><dd>删除</dd></dl><{/if}></div>
			                </div>
					    </div>
					    <div class="layui-tab-item ">

					   		 <div class="layui-form-item">
			                     <label class="layui-form-label">标题颜色</label>
			                     <div class="layui-input-inline">
			                     	<input type="text" name="titlecolor" value="<{$content.titlecolor}>" placeholder="请选择标题颜色"  class="layui-input jscolor <{hash:true}>">
			                     </div>
			                 </div>

			                 <div class="layui-form-item">
			                     <label class="layui-form-label">副标题</label>
			                     <div class="layui-input-block">
			                     	<input type="text" name="subtitle" value="<{$content.subtitle}>" placeholder="请输入副标题" class="layui-input">
			                     </div>
			                 </div>

			                 <div class="layui-form-item">
			                     <label class="layui-form-label">时间</label>
			                     <div class="layui-input-inline">
			                     	<input type="text" name="date" value="<{$content.date}>" readonly placeholder="请选择发布时间"  class="layui-input datetime">
			                     </div>
			                     <div class="layui-form-mid layui-word-aux">温馨提示：单页不支持定时发布！</div>
			                </div>

			                <div class="layui-form-item">
		                		<label class="layui-form-label">附件</label>
		                		<div class="layui-input-inline">
			                     	<input type="text" name="enclosure" id="enclosure" value="<{$content.enclosure}>" placeholder="请上传附件"  class="layui-input">
			                     </div>
			                     <button type="button" class="layui-btn file" data-des="enclosure">
								 	 <i class="layui-icon">&#xe67c;</i>上传附件
								 </button>
			                </div>

			                <div class="layui-form-item">
			                     <label class="layui-form-label">SEO关键字</label>
			                     <div class="layui-input-block">
			                     	<input type="text" name="keywords" value="<{$content.keywords}>"  placeholder="请输入详情页SEO关键字" class="layui-input">
			                     </div>
			                </div>

			                <div class="layui-form-item">
			                     <label class="layui-form-label">SEO描述</label>
			                     <div class="layui-input-block">
			                     	<textarea name="description" placeholder="请输入详情页SEO描述" class="layui-textarea"><{$content.description}></textarea>
			                     </div>
			                </div>

			                <div class="layui-form-item">
			                     <label class="layui-form-label">状态</label>
			                     <div class="layui-input-block">
			                     	<input type="radio" name="status" value="1" title="显示" <{if condition="$content.status eq 1"}> checked="checked"<{/if}>>
									<input type="radio" name="status" value="0" title="隐藏" <{if condition="$content.status eq 0"}> checked="checked"<{/if}>>
			                     </div>
			                </div>
					    </div>
					  </div>
					</div>
					<div class="layui-form-item">
						 <div class="layui-input-block">
						    <button class="layui-btn" lay-submit>立即提交</button>
						    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
						    <{:get_btn_back('Model')}>
						 </div>
					</div>
	  		</form>
	  	</div>
	  </div>
	</div>

</div>

<style>.placeHolder {border:dashed 2px gray; }</style>
<script type="text/javascript" src="__STATIC__/tongycjs/js/jquery.dragsort-0.5.2.min.js"></script>
<{include file='public/ueditor'}>
<script>
//初始化编辑器
$(document).ready(function (e) {
	var ue = UE.getEditor('myeditor',{
		maximumWords:30000
	});
})
</script>
<script type="text/javascript">
$("#pics_box").dragsort({
	dragSelector: "dl",
	dragSelectorExclude: "input,textarea,dd",
	dragBetween: false,
	dragEnd: saveOrder,
	placeHolderTemplate: "<dl class='placeHolder'><dt></dt></dl>"
});

function saveOrder() {
	var data = $("#pics_box dl dt img").map(function() {
		return $(this).data("url");
	}).get();
	$("input[name=pics]").val(data.join(","))
};
</script>
<script type="text/javascript" src="__STATIC__/tongycjs/js/jscolor.js"></script>

<{include file='public/foot'}>